<?php

class Model_Developer
{
    private function prepareConnection()
    {
        if (!isset($this->db))
        {
            $db = Zend_Registry::get("db_main");
            if (!$db->connected) $db->connect();
            $this->db = $db->escoreboar;
        }
    }
    public function exists($token)
    {
        $this->prepareConnection();
        $dev= $this->db->developer->findOne( array('_id' => new MongoId($token)) );
        return count($dev)>0;
    }


}

